#include "ogldrawer.h"

OGLDrawer::OGLDrawer()
{
}

void OGLDrawer::DrawCurve( const vector< QPointF >& control_points )
{

}

void OGLDrawer::DrawControlPoints( const vector< QPointF >& control_points )
{

}

void OGLDrawer::DrawControlPolyline( const vector< QPointF >& control_points )
{

}

void OGLDrawer::DrawPoint(GLint x, GLint y, GLint radius, float* color)
{
    float angle;

    glPushMatrix( );
    glLoadIdentity( );

    glColor3f( color[0], color[1], color[2] );
    glLineWidth( 2.0f );

    glBegin( GL_POLYGON );
        for ( int i = 0; i < 100; i++ )
        {
            angle = i * 2.0 * M_PI / 100.0;
            glVertex2f( x + (cos( angle ) * radius), y + (sin( angle ) * radius) );
        }
    glEnd( );

    glPopMatrix( );
}
